package com.buercorp.wangyu.buerlinkedlist;

import java.util.Iterator;

public class User {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        list.add("xiaoli");
        list.add("26");
        list.add("男");
        list.add("xiaoming");
        System.out.println("获取的是： " + list.get(2));
        Object del = list.remove(3);
        System.out.println("删除的是：" + del);
//        list.clear();
        System.out.println(list.size());
        System.out.println(list);
        while (list.iterator().hasNext()){
            Object str = list.iterator().next();
            System.out.println(str);
        }
    }
}
